public class Demo {
    public static void main(String[] args) {
        System.out.println(fac(5));
    }
    public static int fac(int n) {
        int ret = 1;
        for(int i = 1;i <= n;i++) {
            ret *= i;
        }
        return ret;
    }
}
